export const getEventsData = () => {
  let eventsData = []
  const savedEvents = localStorage.getItem('lifeEvents')

  if (savedEvents) {
    try {
      eventsData = JSON.parse(savedEvents)
    } catch (e) {
      console.error('解析本地存储数据失败:', e)
      eventsData = {}
    }
  } else {
    eventsData = {
      1992: [],
      1993: [],
      1994: [],
      1995: [],
      1996: [],
      1997: [],
      1998: [],
      1999: [],
      2000: [],
      2001: [],
      2002: [],
      2003: [],
      2004: [],
      2005: [],
      2006: [],
      2007: [],
      2008: [],
      2009: [],
      2010: [],
      2011: [],
      2012: [],
      2013: [],
      2014: [],
      2015: [],
      2016: [],
      2017: [],
      2018: [],
      2019: [],
      2020: [],
      2021: [],
      2022: [],
      2023: [],
      2024: [],
      2025: [],
      2026: [],
      2027: [],
      2028: [],
      2029: [],
      2030: [],
      2031: [],
      2032: [],
      2033: [],
      2034: [],
      2035: [],
      2036: [],
      2037: [],
      2038: [],
      2039: [],
      2040: [],
      2041: [],
      2042: [],
      2043: [],
      2044: [],
      2045: [],
      2046: [],
      2047: [],
      2048: [],
      2049: [],
      2050: [],
      2051: [],
      2052: [],
      2053: [],
      2054: [],
      2055: [],
      2056: [],
      2057: [],
      2058: [],
      2059: [],
      2060: [],
      2061: [],
      2062: [],
      2063: [],
      2064: [],
      2065: [],
      2066: [],
      2067: [],
      2068: [],
      2069: [],
      2070: [],
      2071: [],
      2072: [],
      2073: [],
      2074: [],
      2075: [],
      2076: [],
      2077: [],
      2078: [],
      2079: [],
      2080: [],
      2081: [],
      2082: [],
      2083: [],
      2084: [],
      2085: [],
      2086: [],
      2087: [],
      2088: [],
      2089: [],
      2090: [],
      2091: []
    }
  }
  return eventsData
}

export const eventTypeData = [
  {
    label: '喜事',
    value: 'joyful',
    color: '#E63946',
    decs: '红色，喜庆、热情、庆祝'
  },
  {
    label: '哀事',
    value: 'mourning',
    color: '#2C3E50',
    decs: '深蓝黑，庄重、肃穆、哀悼'
  },
  {
    label: '忧事',
    value: 'difficulty',
    color: '#34495E',
    decs: '深灰蓝，压力、挑战、困境'
  },
  {
    label: '人生阶段',
    value: 'life_stage',
    color: '#27AE60',
    decs: '绿色，成长、转折、自然节点'
  },
  {
    label: '纪念/情感',
    value: 'memory',
    color: '#E91E63',
    decs: '粉色，温馨、个人情感'
  }
]
